<template>
  <!-- 个人中心 -->
  <div class="home">
    <van-nav-bar title="个人信息"  left-arrow @click-left="onClickLeft">
      <template #right>
        <van-icon name="wap-home-o" size="25" @click="onClickRight" />
      </template>
    </van-nav-bar>

   
    <ul>
      <li>
        <span>姓名</span>
        <span>{{ userinfo.name }}</span>
      </li>
      <li>
        <span>联系电话</span>
        <span>{{ userinfo.phone }}</span>
      </li>
    </ul>
    <ul>
      <li>
        <span>性别</span>
        <span>{{ userinfo.age }}</span>
      </li>
      <li>
        <span>年薪</span>
        <span>{{ userinfo.month_salary }}</span>
      </li>
      <li>
        <span>月薪</span>
        <span>{{ userinfo.year_salary }}</span>
      </li>
      <li>
        <span>个人简历</span>
        <span>{{ userinfo.remark }}</span>
      </li>
    </ul>
  </div>
</template>
<script>
import { GetInfo } from "../raxios/api";
export default {
  data() {
    return {
      userinfo: {},
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    onClickRight() {
      this.$router.push('/home');
    },
  },
  created() {
    GetInfo().then((res) => {
      console.log(res);
      this.userinfo = res.data;
    });
  },
};
</script>
 
<style  lang="less" scoped>
.home {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  right: 0;
  background-color: #fff;
  z-index: 99;
  background-color: #f5f5f5;
  overflow: scroll;}
.van-nav-bar {
  background-color: #003399;
  /deep/.van-nav-bar__title {
    color: #fff;
  }
   /deep/.van-icon {
      color: #fff;
      font-size: 0.22rem;
    }
}
ul {
  margin-bottom: 0.1rem;
  li {
    height: 0.4rem;
    line-height: 0.4rem;
    padding: 0 0.2rem;
    background-color: #fff;
    border-bottom: 1px solid #ededed;
    display: flex;
    justify-content: space-between;
  }
}
</style>